package com.conan.zone.rss.support;

import java.util.ArrayList;
import java.util.List;

import com.conan.zone.rss.support.parser.CnbetaRssParser;
import com.conan.zone.rss.support.parser.IRssParser;
import com.conan.zone.rss.support.parser.NYTimesRssParser;
import com.conan.zone.rss.support.parser.PeopleRssParser;
import com.conan.zone.rss.support.parser.QQRssParser;
import com.conan.zone.rss.support.parser.VerycdRssParser;

/**
 * 
 * @author Conan
 *
 */
public class Rss {
	
	/**
	 * 
	 * @return
	 */
	public static List<RssObj> allRssObj(){
		List<RssObj> list = new ArrayList<RssObj>();
		Rss.RssObj o = new Rss.RssObj();
		list.add(new RssObj(1L,"http://news.qq.com/newsgj/rss_newswj.xml","QQ国际新闻","世界新闻报道 ",RssObj.LAN_CHINESE,new QQRssParser()));
		list.add(new RssObj(2L,"http://www.people.com.cn/rss/world.xml","人民网 国际新闻","国际新闻 ",RssObj.LAN_CHINESE,new PeopleRssParser()));
		list.add(new RssObj(3L,"http://www.cnbeta.com/backend.php","cnbeta","cnbeta",RssObj.LAN_ENGLISH,new CnbetaRssParser()));
		list.add(new RssObj(4L,"http://www.nytimes.com/services/xml/rss/nyt/GlobalHome.xml","NYtimes Golbal Home","",RssObj.LAN_ENGLISH,new NYTimesRssParser()));
		list.add(new RssObj(5L,"http://www.verycd.com/base/cartoon/feed","VeryCD 动漫","",RssObj.LAN_CHINESE,new VerycdRssParser()));
		return list;
	}
	
	/**
	 * 
	 * @author Conan
	 *
	 */
	public static class RssObj implements java.io.Serializable{
		public final static int LAN_CHINESE=1;
		public final static int LAN_ENGLISH=2;
		private static final long serialVersionUID = 6961730378905156481L;
		private Long rssId;
		private String link;
		private String name;
		private String desc;
		private IRssParser parser;
		private int lanType;
		
		
		public RssObj() {super();}
		
		public RssObj(Long rssId, String link, String name, String desc,int lanType,IRssParser parser) {
			super();
			this.rssId = rssId;
			this.link = link;
			this.name = name;
			this.desc = desc;
			this.lanType = lanType;
			this.parser = parser;
		}
		public Long getRssId() {
			return rssId;
		}
		public void setRssId(Long rssId) {
			this.rssId = rssId;
		}
		public String getLink() {
			return link;
		}
		public void setLink(String link) {
			this.link = link;
		}
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public String getDesc() {
			return desc;
		}
		public void setDesc(String desc) {
			this.desc = desc;
		}

		public IRssParser getParser() {
			return parser;
		}

		public void setParser(IRssParser parser) {
			this.parser = parser;
		}

		public int getLanType() {
			return lanType;
		}

		public void setLanType(int lanType) {
			this.lanType = lanType;
		}
		
		
		
	}
}
